#include "game.h"
#include "video.h"

int main( int args, char *argv[] ) {

	// Initiera video
	video.initVideo();

	// Skapa ett Game
	new Game();

	// Rita skärmen, flippa allt
	video.ritaOmAllt();
	video.flip();

	// Main game loop
	bool running = true;
	while( running ){
		SDL_Event event;
		SDL_WaitEvent( &event );

		switch( event.type ){
			case SDL_VIDEOEXPOSE:
				video.flip();
				break;

			case SDL_QUIT:
				running = false;
				break;

			case SDL_MOUSEBUTTONDOWN:
				game->musKlick( event.button.x, event.button.y );
		}
	}

	delete game;

	return 0;
}
